﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using YoucaiReader.Pages;

namespace YoucaiReader.UserControls
{
    public partial class ReaderPageHelp : UserControl
    {
        private PhoneApplicationPage _BasePage;

        public ReaderPageHelp(PhoneApplicationPage basePage)
        {
            this.InitializeComponent();
            base.ManipulationStarted += ReaderPageHelp_ManipulationStarted;
            base.ManipulationDelta += ReaderPageHelp_ManipulationDelta;
            base.ManipulationCompleted += ReaderPageHelp_ManipulationCompleted;
            this._BasePage = basePage;
        }

        void ReaderPageHelp_ManipulationCompleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e)
        {
            e.Handled = true;
            (this._BasePage as BookReaderPage).RemoveHelpPage();
        }

        void ReaderPageHelp_ManipulationDelta(object sender, System.Windows.Input.ManipulationDeltaEventArgs e)
        {
            e.Handled = true;
        }

        void ReaderPageHelp_ManipulationStarted(object sender, System.Windows.Input.ManipulationStartedEventArgs e)
        {
            e.Handled = true;
        }
    }
}
